home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / utils / unix / unzip-5.12 / unzip.doc < prev    next >
Text File  |  1994-08-24  |  33KB  |  705 lines

  1.  
  2. UNZIP(1L)         MISC. REFERENCE MANUAL PAGES          UNZIP(1L)
  3.  
  4. NAME
  5.      unzip - list, test and extract compressed  files  in  a  ZIP
  6.      archive
  7.  
  8. SYNOPSIS
  9.      unzip [-Z] [-cflptuvz[abjnoqsCLV$]] file[.zip] [file(s) ...]
  10.      [-x xfile(s) ...] [-d exdir]
  11.  
  12. DESCRIPTION
  13.      unzip will list, test, or extract files from a ZIP  archive,
  14.      commonly  found  on  MS-DOS  systems.   The default behavior
  15.      (with no options) is to extract into the  current  directory
  16.      (and  subdirectories  below it) all files from the specified
  17.      ZIP archive.  A  companion  program,  zip(1L),  creates  ZIP
  18.      archives; both programs are compatible with archives created
  19.      by PKWARE's PKZIP and PKUNZIP for MS-DOS, but in many  cases
  20.      the program options or default behaviors differ.
  21.  
  22. ARGUMENTS
  23.      file[.zip]
  24.           Path of the ZIP archive(s).  If the file  specification
  25.           is  a  wildcard,  each matching file is processed in an
  26.           order determined by the operating system (or file  sys-
  27.           tem).   Only  the  filename can be a wildcard; the path
  28.           itself cannot.  Wildcard  expressions  are  similar  to
  29.           Unix egrep(1) (regular) expressions and may contain:
  30.  
  31.           *    matches a sequence of 0 or more characters
  32.  
  33.           ?    matches exactly 1 character
  34.  
  35.           [...]
  36.                matches any  single  character  found  inside  the
  37.                brackets;  ranges  are  specified  by  a beginning
  38.                character, a hyphen, and an ending character.   If
  39.                an  exclamation point or a caret (`!' or `^') fol-
  40.                lows the left bracket, then the range  of  charac-
  41.                ters within the brackets is complemented (that is,
  42.                anything except the characters inside the brackets
  43.                is considered a match).
  44.  
  45.           (Be sure to quote any character which  might  otherwise
  46.           be  interpreted  or  modified  by the operating system,
  47.           particularly under Unix and VMS.)  If  no  matches  are
  48.           found,  the  specification  is  assumed to be a literal
  49.           filename; and if that also fails, the  suffix  .zip  is
  50.           appended.  Note that self-extracting ZIP files are sup-
  51.           ported, as with any other ZIP archive; just specify the
  52.           .exe suffix (if any) explicitly.
  53.  
  54.      [file(s)]
  55.           An optional list of archive members  to  be  processed,
  56.  
  57. Info-ZIP         Last change: 28 Aug 94 (v5.12)                 1
  58.  
  59. UNZIP(1L)         MISC. REFERENCE MANUAL PAGES          UNZIP(1L)
  60.  
  61.           separated  by  spaces.   (VMS  versions  compiled  with
  62.           VMSCLI defined must delimit files with commas  instead.
  63.           See  -v  in  OPTIONS below.) Regular expressions (wild-
  64.           cards) may be  used  to  match  multiple  members;  see
  65.           above.   Again, be sure to quote expressions that would
  66.           otherwise be expanded or modified by the operating sys-
  67.           tem.
  68.  
  69.      [-x xfile(s)]
  70.           An optional list of archive members to be excluded from
  71.           processing.   Since wildcard characters match directory
  72.           separators (`/'), this option may be  used  to  exclude
  73.           any  files  which  are in subdirectories.  For example,
  74.           ``unzip foo *.[ch] -x */*'' would extract all C  source
  75.           files  in the main directory, but none in any subdirec-
  76.           tories.  Without the -x option, all C source  files  in
  77.           all directories within the zipfile would be extracted.
  78.  
  79.      [-d exdir]
  80.           An optional directory to which to  extract  files.   By
  81.           default,  all files and subdirectories are recreated in
  82.           the current directory; the -d option allows  extraction
  83.           in an arbitrary directory (always assuming one has per-
  84.           mission to write to the directory).  This  option  need
  85.           not  appear  at the end of the command line; it is also
  86.           accepted immediately after the  zipfile  specification,
  87.           or  between  the file(s) and the -x option.  The option
  88.           and directory may be  concatenated  without  any  white
  89.           space between them, but note that this may cause normal
  90.           shell  behavior  to  be  suppressed.   In   particular,
  91.           ``-d ~''  (tilde) is expanded by Unix C shells into the
  92.           name of the  user's  home  directory,  but  ``-d~''  is
  93.           treated  as a literal subdirectory ``~'' of the current
  94.           directory.
  95.  
  96. OPTIONS
  97.      Note that, in order to support obsolescent hardware, unzip's
  98.      usage  screen is limited to 22 or 23 lines and should there-
  99.      fore be considered a reminder  of  the  basic  unzip  syntax
  100.      rather than an exhaustive list of all possible flags.
  101.  
  102.      -Z   zipinfo(1L) mode.  If the first option on  the  command
  103.           line  is  -Z,  the  remaining  options  are taken to be
  104.           zipinfo(1L) options.  See the appropriate  manual  page
  105.           for a description of these options.
  106.  
  107.      -c   extract files to stdout/screen (``CRT'').  This  option
  108.           is  similar  to  the  -p option except that the name of
  109.           each file is printed as it is extracted, the -a  option
  110.           is  allowed,  and  ASCII-EBCDIC conversion is automati-
  111.           cally performed if appropriate.   This  option  is  not
  112.           listed in the unzip usage screen.
  113.  
  114. Info-ZIP         Last change: 28 Aug 94 (v5.12)                 2
  115.  
  116. UNZIP(1L)         MISC. REFERENCE MANUAL PAGES          UNZIP(1L)
  117.  
  118.      -f   freshen existing files, i.e., extract only those  files
  119.           which  already  exist  on disk and which are newer than
  120.           the disk  copies.   By  default  unzip  queries  before
  121.           overwriting,  but the -o option may be used to suppress
  122.           the queries.  Note that under many  operating  systems,
  123.           the  TZ  (timezone)  environment  variable  must be set
  124.           correctly in order for  -f  and  -u  to  work  properly
  125.           (under Unix the variable is usually set automatically).
  126.           The reasons for this are somewhat subtle but have to do
  127.           with  the  differences  between  DOS-format  file times
  128.           (always local time) and Unix-format  times  (always  in
  129.           GMT)  and  the necessity to compare the two.  A typical
  130.           TZ value is ``PST8PDT'' (US Pacific time with automatic
  131.           adjustment   for  Daylight  Savings  Time  or  ``summer
  132.           time'').
  133.  
  134.      -l   list  archive  files  (short   format).    The   names,
  135.           uncompressed  file  sizes  and  modification  dates and
  136.           times of the specified files are  printed,  along  with
  137.           totals  for all files specified.  In addition, the zip-
  138.           file comment and individual file comments (if any)  are
  139.           displayed.   If  a file was archived from a single-case
  140.           file system (for example, the old MS-DOS FAT file  sys-
  141.           tem)  and the -L option was given, the filename is con-
  142.           verted to lowercase and is prefixed with a caret (^).
  143.  
  144.      -p   extract files to pipe (stdout).  Nothing but  the  file
  145.           data  is  sent  to  stdout,  and  the  files are always
  146.           extracted in binary format, just as they are stored (no
  147.           conversions).
  148.  
  149.      -t   test archive files.  This option extracts  each  speci-
  150.           fied file in memory and compares the CRC (cyclic redun-
  151.           dancy check, an enhanced checksum) of the expanded file
  152.           with the original file's stored CRC value.
  153.  
  154.      -u   update existing files and create new  ones  if  needed.
  155.           This  option  performs  the  same  function  as  the -f
  156.           option, extracting (with query) files which  are  newer
  157.           than  those with the same name on disk, and in addition
  158.           it extracts those files which do not already  exist  on
  159.           disk.   See  -f  above  for  information on setting the
  160.           timezone properly.
  161.  
  162.      -v   be verbose or  print  diagnostic  version  info.   This
  163.           option  has  evolved  and now behaves as both an option
  164.           and a modifier.  As an  option  it  has  two  purposes:
  165.           when  a  zipfile is specified with no other option